package jsyf.oa.entity.tmpEvent;

import com.alibaba.fastjson.JSONObject;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Table;

import jsyf.oa.ientity.BaseEntity;

@Entity
@Table(name = "T_TMP_EVENT_MAIN", schema = "oa", catalog = "")
public class EventMainEntity extends BaseEntity {

    private String type;
    private String title;
    private String orgName;
    private String regionName;
    private String description;
    private String createUserId;
    private Date createTime;
    private String copierReturnReason;
    /**
     * 审核状态:
     * <p>
     * -1:未提交/草稿<br/>
     * 0: 已提交/审核中<br/>
     * 1: 审核通过<br/>
     * 2: 审核驳回<br/>
     * <p>
     */
    private String auditFlag;
    private String createUserName;
    private String currentAuditorId;
    private String currentAuditorName;
    private String companyId;
    private String createUserTel;

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getOrgName() {
        return orgName;
    }

    public void setOrgName(String orgName) {
        this.orgName = orgName;
    }

    public String getRegionName() {
        return regionName;
    }

    public void setRegionName(String regionName) {
        this.regionName = regionName;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(String createUserId) {
        this.createUserId = createUserId;
    }

    @Override
    public Date getCreateTime() {
        return createTime;
    }

    @Override
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getAuditFlag() {
        return auditFlag;
    }

    public void setAuditFlag(String auditFlag) {
        this.auditFlag = auditFlag;
    }

    public String getCreateUserName() {
        return createUserName;
    }

    public void setCreateUserName(String createUserName) {
        this.createUserName = createUserName;
    }

    public String getCurrentAuditorId() {
        return currentAuditorId;
    }

    public void setCurrentAuditorId(String currentAuditorId) {
        this.currentAuditorId = currentAuditorId;
    }

    public String getCurrentAuditorName() {
        return currentAuditorName;
    }

    public void setCurrentAuditorName(String currentAuditorName) {
        this.currentAuditorName = currentAuditorName;
    }

    public String getCompanyId() {
        return companyId;
    }

    public void setCompanyId(String companyId) {
        this.companyId = companyId;
    }

    public String getCreateUserTel() {
        return createUserTel;
    }

    public void setCreateUserTel(String createUserTel) {
        this.createUserTel = createUserTel;
    }

    public String getCopierReturnReason() {
        return copierReturnReason;
    }

    public void setCopierReturnReason(String copierReturnReason) {
        this.copierReturnReason = copierReturnReason;
    }

    @Override
    public JSONObject getJSONObject() {
        JSONObject obj = new JSONObject();
        obj.put("ID", id);
        obj.put("TYPE", type);
        obj.put("TITLE", title);
        obj.put("ORG_NAME", orgName);
        obj.put("REGION_NAME", regionName);
        obj.put("DESCRIPTION", description);
        obj.put("CREATE_USER_ID", createUserId);
        obj.put("CREATE_TIME", createTime);
        obj.put("AUDIT_FLAG", auditFlag);
        obj.put("CREATE_USER_NAME", createUserName);
        obj.put("CURRENT_AUDITOR_ID", currentAuditorId);
        obj.put("CURRENT_AUDITOR_NAME", currentAuditorName);
        obj.put("COMPANY_ID", companyId);
        obj.put("CREATE_USER_TEL", createUserTel);
        obj.put("COPIER_RETURN_REASON", copierReturnReason);
        return obj;
    }

    @Override
    public String getTableName() {
        return "T_TMP_EVENT_MAIN";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject obj = new JSONObject();
        obj.put("ID", "id");
        obj.put("TYPE", "type");
        obj.put("TITLE", "title");
        obj.put("ORG_NAME", "orgName");
        obj.put("REGION_NAME", "regionName");
        obj.put("DESCRIPTION", "description");
        obj.put("CREATE_USER_ID", "createUserId");
        obj.put("CREATE_TIME", "createTime");
        obj.put("AUDIT_FLAG", "auditFlag");
        obj.put("CREATE_USER_NAME", "createUserName");
        obj.put("CURRENT_AUDITOR_ID", "currentAuditorId");
        obj.put("CURRENT_AUDITOR_NAME", "currentAuditorName");
        obj.put("COMPANY_ID", "companyId");
        obj.put("CREATE_USER_TEL", "createUserTel");
        obj.put("COPIER_RETURN_REASON", "copierReturnReason");
        return obj;
    }

}
